package com.example.chirdrenserver.confg;


import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * @Author Yu
 * @Description //TODO $
 * @Date $ $
 **/
@Configuration
public class CacheConfig {
    private static final ReentrantReadWriteLock cacheLock = new ReentrantReadWriteLock();

    @Bean
    public ReentrantReadWriteLock.ReadLock getreadLock() {
        return cacheLock.readLock();

    }

    @Bean
    public ReentrantReadWriteLock.WriteLock getwriteLock() {
        return cacheLock.writeLock();
    }



}
